package org.real.tomcat.study;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.ServerSocket;
import java.net.Socket;

public class ServerSocketInstance {
	public static void main(String[] args) throws IOException {
		ServerSocket serverSocket = new ServerSocket(80);
		Socket socket = serverSocket.accept();
		BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));
		String str = "";
		while ((str = br.readLine()) != null) {
			System.out.println(str);
		}
	}
}
